home *** CD-ROM | disk | FTP | other *** search
Wrap
<? $agent = getenv("HTTP_USER_AGENT"); if (preg_match("/MSIE/i", "$agent")) { $tarayici = "IE"; } else if (preg_match("/Mozilla/i", "$agent")) { $tarayici = "NS"; } ?> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1254"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-9"> <? if ($tarayici == "IE" ){?> <style type="text/css"> h2 { color:#ff0000; font-family: Verdana; font-weight:bold; font-size:20px; text-decoration:none; } .tekst { color:#000000; font-family: Verdana; font-weight:normal; font-size:12px; text-decoration:none; } a { color:#ff0000; font-family: Verdana; font-weight:normal; font-size:12px; text-decoration:none; } a:hover { color:#00ff00; font-family: Verdana; font-weight:normal; font-size:12px; text-decoration:none; } </style> <?php } else if ($tarayici == "NS" ){?> <style type="text/css"> h2 { color:#0000ff; font-family: Times New Roman; font-weight:bold; font-size:25px; text-decoration:none; } .tekst { color:#000000; font-family: Times New Roman; font-weight:normal; font-size:15px; text-decoration:none; } a { color:#0000ff; font-family: Times New Roman; font-weight:normal; font-size:15px; text-decoration:none; } a:hover { color:#00ff00; font-family: Times New Roman; font-weight:normal; font-size:15px; text-decoration:none; } </style> <?php } ?> </head> <body bgcolor="#ffffff"> <h2>Ba■l²k</h2> <span class="tekst"> Bu PHP sayfas² ÷nce ziyaretτinin kulland²≡² taray²c² modelini dedekte ediyor daha sonra <a href="http://www.microsoft.com">Internet Explorer</a>'sa farkl² <a href="http://www.mozilla.org">Netscape</a> ise farkl² CSS stilini kullan²yor. </span> </body> </html>